home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9007 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  864 b 

  1. Path: news.erg.cuhk.hk!cslee
  2. From: cslee@cs.cuhk.hk (ERiC LEE)
  3. Newsgroups: comp.lang.c
  4. Subject: Special linked list
  5. Date: 7 Mar 1996 17:52:31 GMT
  6. Organization: Engineering Faculty CUHK
  7. Message-ID: <4hn7ov$e1t@eng_ser1.erg.cuhk.hk>
  8. NNTP-Posting-Host: sun9.cs.cuhk.hk
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11.     Is there a method to build a linked list using struct & pointer, 
  12. where the linked list (in fact a two-dimensional linked list, where for 
  13. example, b3 has 2 pointers at b4 & a3, which is also pointed by b2 & c3) 
  14. is as shown below? (All the data are long integers)
  15.  
  16.         a1 -> a2 -> a3 -> a4 -> ...
  17.  
  18.         ^     ^     ^     ^
  19.         |     |     |     |
  20.  
  21.         b1 -> b2 -> b3 -> b4 -> ...
  22.  
  23.         ^     ^     ^     ^
  24.         |     |     |     |
  25.  
  26.         c1 -> c2 -> c3 -> c4 -> ...
  27.  
  28.         ^     ^     ^     ^
  29.         |     |     |     |
  30.  
  31.         .     .     .     .
  32.         .     .     .     .
  33.         .     .     .     .
  34.